{{ partial "head" . }}
<body>
{{ partial "header" . }}

<div id="body">
    <div class="container">
        <div class="col-group">

            <div class="col-8" id="main">
            
                <div class="res-cons">
                    <article class="post">
                        <header>
                            <h1 class="post-title animated slower flipInX"><i class="fa fa-file-text-o"></i>&nbsp;{{ .Title }}</h1>
                        </header>
                        <date class="post-meta meta-date animated slower fadeInUp">
                        <i class="fa fa-calendar" aria-hidden="true"></i>
                            {{ .Date.Year }}年{{ printf "%d" .Date.Month }}月{{ .Date.Day }}日
                            {{ printf "%02d" .Date.Hour }}:{{ printf "%02d" .Date.Minute }}
                            
                        </date>
                        <div class="post-meta animated slower fadeInUp">
                            | <i class="fa fa-user-o" aria-hidden="true"></i>
                            <a href="/about">{{ .Site.Author.name }}</a>
                        </div>
                        {{ with .Params.Categories }}
                        <div class="post-meta animated slower fadeInUp">
                         | <i class="fa fa-folder-o" aria-hidden="true"></i>
                            {{ range . }}
                                <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
                            {{ end }}
                        </div>
                        {{ end }}
                        <br />
                        <div class="post-meta animated slower fadeInUp">
                            <i class="fa fa-clock-o"></i>&nbsp;阅读时间{{.ReadingTime}}分钟
                        </div>
                        <br />
                    </article>
                    {{ partial "comments" . }}
                </div>
                {{ if (.Params.TableOfContents) }}
                <aside>
                    <div class="tablelist animated slower flipInX">
                    {{ .TableOfContents }}
                    </div>
                </aside>
                 {{ end }}
                        <div class="post-content animated slower fadeInLeftBig">
                            <article>
                            {{ .Content }}
                            
                            <br />
                            <br />
                            <br />
                            <hr />
                            
                            {{if (.Next)}}
                            <a href="{{ .Next.Permalink }}">上一页&nbsp;<i class="fa fa-angle-double-up" ></i></a>&nbsp;{{ .Next.LinkTitle }}<br /><br />
                            {{ end }}
                            {{if (.Prev)}}
                            <a href="{{ .Prev.Permalink }}">下一页&nbsp;<i class="fa fa-angle-double-down" ></i></a>&nbsp;{{ .Prev.LinkTitle }}
                            {{ end }}
                            <br />
                            <br />
                            <br />
                            
                            </article>
                        </div>
                        <p class="pull-right2"><a href="/" class="fa fa-home" ></a></p>
                            <p class="pull-right"><a href="#" class="fa fa-angle-double-up" ></a></p>
                            <p class="pull-left"><a href="#" onclick="javascript:history.go(-1);return false;" class="fa fa-angle-double-left" ></a></p>
                {{ if (.Params.gitment) }}
                <div id="git-comments"></div>
                <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css" />
                <script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>
                <script>
                
                function GetUrlRelativePath()
            　　{
            　　　　var url = document.location.toString();
            　　　　var arrUrl = url.split("//");

            　　　　var start = arrUrl[1].indexOf("/");
            　　　　var relUrl = arrUrl[1].substring(start);//stop省略，截取从start开始到结尾的所有字符

            　　　　if(relUrl.indexOf("?") != -1){
            　　　　　　relUrl = relUrl.split("?")[0];
            　　　　}
            　　　　return relUrl;
            　　}
                  
                  var gitalk = new Gitalk({
                  clientID: {{ .Site.Params.clientID }},
                  clientSecret: {{ .Site.Params.clientSecret }},
                  owner: {{ .Site.Params.owner }},
                  repo: {{ .Site.Params.repo }},
                  admin: [{{ .Site.Params.admin }}],
                    id: GetUrlRelativePath(),  // 可选, 默认为 location.href
                  distractionFreeMode: false  // Facebook-like distraction free mode
                })

                gitalk.render('git-comments')
                </script>
                {{ end }}
                        
            </div>
            {{ partial "sidebar" . }}
        </div>
    </div>
</div>
{{ partial "footer" . }}
</body>
</html>